const app = {
    namespaced: true,
    state: {
        // 菜单栏是否收起
        sidebarCollapse: false
    },
    getters: {
        sidebarCollapse: state => state.sidebarCollapse,
    },

    mutations: {
        // 收起展开菜单
        TOGGLE_SIDEBAR: state => {
            state.sidebarCollapse = !state.sidebarCollapse
        }
    },

    actions: {
        toggleSideBar({commit}) {
            commit('TOGGLE_SIDEBAR')
        }
    }
}

export default app
